package saas.adapter.sdk.core.hook;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.client.hook.ConsumeMessageContext;
import org.apache.rocketmq.client.hook.ConsumeMessageHook;
import saas.adapter.sdk.constant.Constants;

/**
 * @title: RmqConsumeSaasTenantMappingHook
 * @description: Rmq消费Saas租户映射钩子（本系统消费上游RMQ消息）
 * @author: guan.xin
 * @create: 2021-11-12 12:19
 * @since: JDK8
 */
@Slf4j
public class RmqConsumerTenantConversionHook implements ConsumeMessageHook {

    @Override
    public String hookName() {
        return Constants.SAAS_CONSUME_MESSAGE_HOOK_NAME;
    }

    @Override
    public void consumeMessageBefore(ConsumeMessageContext context) {
        log.info("consumeMessageBefore");
    }

    @Override
    public void consumeMessageAfter(ConsumeMessageContext context) {
        log.info("consumeMessageAfter");
    }
}
